package com.sxbang.friday.dao;


import com.sxbang.friday.model.SysPermission;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface PermissionDao {
    @Insert("insert into sys_permission values(#{id},#{parentId},#{name},#{css},#{href},#{type},#{permission},#{sort})")
    int insertUser(SysPermission sysPermission);
    @Delete("delete from sys_permission where id =#{id};")
    int deleteUser(int id);
    @Select("select * from sys_permission ")
    List<SysPermission> selectUser();
    @Select("select * from sys_permission where  id = #{id}")
    SysPermission getUser(int id);


}
